package top.overstep.user.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.overstep.user.consumer.service.UserService;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
@EnableFeignClients
public class MicroServiceUserConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(MicroServiceUserConsumerApplication.class, args);
    }

    @Autowired
    private UserService userService;
    @RequestMapping("/hello" )
    public String getHello(){
        return userService.getString()+"---------";
    }

}
